//
//  DrawerBarCell.m
//  Pianke
//
//  Created by BetaTheta on 16/1/16.
//  Copyright © 2016年 BetaTheta. All rights reserved.
//

#import "DrawerBarCell.h"

@interface DrawerBarCell ()

@end

@implementation DrawerBarCell

// 初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // backgroundIMG
        self.backgroudIMG = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background3.png"]];
        [self.contentView addSubview:_backgroudIMG];
        
        // barView
        self.barView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]];
//        _barView.backgroundColor = [UIColor orangeColor];
        [_backgroudIMG addSubview:_barView];
        
        // pageName
        self.pageName = [[UILabel alloc] init];
//        _pageName.backgroundColor = [UIColor cyanColor];
        [_backgroudIMG addSubview:_pageName];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _backgroudIMG.frame = self.contentView.frame;
    _barView.frame = CGRectMake(30, 30, 40, 40);
    _pageName.frame = CGRectMake(90, 30, 80, 40);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
